import request from '@/utils/request'

// 查询商品活动列表
export function listMallActivity(query) {
  return request({
    url: '/mall/mallActivity/list',
    method: 'get',
    params: query
  })
}

// 查询商品活动详细
export function getMallActivity(id) {
  return request({
    url: '/mall/mallActivity/' + id,
    method: 'get'
  })
}

// 新增商品活动
export function addMallActivity(data) {
  return request({
    url: '/mall/mallActivity',
    method: 'post',
    data: data
  })
}

// 修改商品活动
export function updateMallActivity(data) {
  return request({
    url: '/mall/mallActivity',
    method: 'put',
    data: data
  })
}

// 删除商品活动
export function delMallActivity(id) {
  return request({
    url: '/mall/mallActivity/' + id,
    method: 'delete'
  })
}
